package org.lee.xml.vo;

/**
 * BookBuilder
 *
 * @author dralee
 * @date 2022-01-06 18:42:01
 **/
public class BookBuilder {
    private String name;
    private String author;
    private String publisher;
    private String isbn;

    public BookBuilder name(String name) {
        this.name = name;
        return this;
    }

    public BookBuilder author(String author) {
        this.author = author;
        return this;
    }

    public BookBuilder publisher(String publisher) {
        this.publisher = publisher;
        return this;
    }

    public BookBuilder isbn(String isbn) {
        this.isbn = isbn;
        return this;
    }

    public Book build() {
        var book = new Book();
        book.setName(name);
        book.setAuthor(author);
        book.setIsbn(isbn);
        book.setPublisher(publisher);
        return book;
    }
}
